<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- valueOf 前端环境 
    1. valueOf 变量的值的访问拦截  get
    es6 对象
    es5 Object.defineProperty
    -->
    <script>
        let value=1;
        Object.defineProperty(window,'a',{
            get(){
                return value++;
            }
        })
        if(a==1 && a==2 && a==3){
            console.log('===')
        }
    </script>
</body>
</html>